﻿@using Microsoft.AspNetCore.Components.Authorization
<CascadingAuthenticationState>
    <ChildContent>
        <Router AppAssembly="@typeof(App).Assembly">
            <Found Context="routeData">
                <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
                @{
                    if (OperatingSystem.IsAndroid() || OperatingSystem.IsIOS())
                    {
                        <FocusOnNavigate RouteData="@routeData" Selector="h1" />
                    }
                }
            </Found>
            <NotFound>
                <RedirectTo Path="404" />
            </NotFound>
        </Router>
    </ChildContent>
</CascadingAuthenticationState>

@code {
    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();
    }
}
